package com.yanqu.road.entity.banquet;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.player.UserBaseInfo;

import java.util.Objects;

public class BanquetRelationshipData extends DataObject {
    @FieldTypeAnnotation(update = true)
    private long myUserId;
    @FieldTypeAnnotation()
    private int myJoinTimes;
    @FieldTypeAnnotation(update = true)
    private long otherUserId;
    private UserBaseInfo otherUserBaseInfo;
    @FieldTypeAnnotation()
    private int otherJoinTimes;
    @FieldTypeAnnotation(update = true)
    private int partyType;
    @FieldTypeAnnotation(select = true)
    private long lastJoinTime;

    public long getMyUserId() {
        return myUserId;
    }

    public void setMyUserId(long myUserId) {
        if (!Objects.equals(this.myUserId, myUserId)) {
            this.myUserId = myUserId;
            setUpdateOption();
        }
    }

    public int getMyJoinTimes() {
        return myJoinTimes;
    }

    public void setMyJoinTimes(int myJoinTimes) {
        if (!Objects.equals(this.myJoinTimes, myJoinTimes)) {
            this.myJoinTimes = myJoinTimes;
            setUpdateOption();
        }
    }

    public long getOtherUserId() {
        return otherUserId;
    }

    public void setOtherUserId(long otherUserId) {
        if (!Objects.equals(this.otherUserId, otherUserId)) {
            this.otherUserId = otherUserId;
            setUpdateOption();
        }
    }

    public UserBaseInfo getOtherUserBaseInfo() {
        return otherUserBaseInfo;
    }

    public void setOtherUserBaseInfo(UserBaseInfo otherUserBaseInfo) {
        if (!Objects.equals(this.otherUserBaseInfo, otherUserBaseInfo)) {
            this.otherUserBaseInfo = otherUserBaseInfo;
            setUpdateOption();
        }
    }


    public void setOtherUserBaseInfoNotUpdate(UserBaseInfo otherUserBaseInfo) {
        this.otherUserBaseInfo = otherUserBaseInfo;
    }


    public int getOtherJoinTimes() {
        return otherJoinTimes;
    }

    public void setOtherJoinTimes(int otherJoinTimes) {
        if (!Objects.equals(this.otherJoinTimes, otherJoinTimes)) {
            this.otherJoinTimes = otherJoinTimes;
            setUpdateOption();
        }
    }

    public int getPartyType() {
        return partyType;
    }

    public void setPartyType(int partyType) {
        if (!Objects.equals(this.partyType, partyType)) {
            this.partyType = partyType;
            setUpdateOption();
        }
    }

    public long getLastJoinTime() {
        return lastJoinTime;
    }

    public void setLastJoinTime(long lastJoinTime) {
        if (!Objects.equals(this.lastJoinTime, lastJoinTime)) {
            this.lastJoinTime = lastJoinTime;
            setUpdateOption();
        }
    }
}
